package com.ecoolex.chinadutyfree.retailer.api.graphql;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.lang.NonNull;

import com.ecoolex.chinadutyfree.retailer.entity.DirectMailGoodsProductBuyLimit;
import com.ecoolex.chinadutyfree.retailer.ws.DirectMailGoodsProductBuyLimitService;
import com.ecoolex.framework.web.api.graphql2.annotation.GraphQL2Module;
import com.ecoolex.framework.web.api.graphql2.annotation.QueryField;
import com.ecoolex.framework.web.api.graphql2.annotation.GraphQL2Module.Type;

@GraphQL2Module(type = Type.User, description = "直邮商品限购数据")
public class DirectMailGoodsProductBuyLimitGraphql {

	@Reference
	private DirectMailGoodsProductBuyLimitService directMailGoodsProductBuyLimitService;
	
	@QueryField(field = "getDirectMailGoodsProductBuyLimitByDirectMailProductId", description = { "根据直邮产品Id查询限购详情" })
	public DirectMailGoodsProductBuyLimit getByProductId(@NonNull Integer directMailProductId) {
		return directMailGoodsProductBuyLimitService.getByProductId(directMailProductId);
	}
}
